import request from "@/utils/request";

export function getItems(paramters) {
  return request({
    url: "api/v1/endperiodprocess/items",
    method: "get",
    params: paramters,
    authServer: false,
  });
}

export function getItem(id) {
  return request({
    url: "api/v1/endperiodprocess/items/" + id,
    method: "get",
    authServer: false,
  });
}

export function updateItem(data) {
  return request({
    url: "api/v1/endperiodprocess/items",
    method: "put",
    data: data,
    authServer: false,
  });
}

export function getItemResults(paramters) {
  return request({
    url: "api/v1/endperiodprocess",
    method: "get",
    params: paramters,
    authServer: false,
  });
}

export function getItemResult(id) {
  return request({
    url: "api/v1/endperiodprocess/item/" + id,
    method: "get",
    authServer: false,
  });
}

export function measureItem(data) {
  return request({
    url: "api/v1/endperiodprocess/measure",
    method: "post",
    data: data,
    authServer: false,
  });
}
